# This code was lifted and modified from the instant-press application by Pablo Martin.
# Code modification where made by Christopher Steel of Voice of Access and remain:
# License: GPL, General Public License v.2
#
# Here is Pablo's header from the original code.
#
# -*- coding: utf-8 -*-
# Instant Press, site that work out the box. Blog system for Web2py Framework 
# Site: http://www.instant2press.com
# Site: http://code.google.com/p/instant-press/
# Copyright (c) 2010- Mulone, Pablo Martín (mulone.martin@gmail.com)
# License: GPL, General Public License v.2
# Visit: www.web2py.com or Groups: http://groups.google.com/group/web2py and http://groups.google.com/group/web2py-usuarios  

#Important constant
IS_FIRST_TIME = True #this is the first time create default data, after the first run, put this to False to reduce innecesary queries 

#please change the default password after first login,
#better register new user and give admin access, then disable
#this admin.
#WARNING: NEVER but never: use in production any password exposed in this constants
DEFAULT_ADMIN_EMAIL = "test@tester.com" #default_admin_email
DEFAULT_ADMIN_PASSWORD = "test" #default_admin_password

target_value_1 = 'plugin_flatpages'
target_value_2 = 'Users who are members of the group, %s, have full CRUD (create, read , update and delete) to the tag data that this application has full CRUD access to.' % (target_value_1)
target_value_1_found='None'

DEFAULT_GROUPADMIN = "plugin_flatpages" #default_groupadmin

#we need some information in the database to work correctly, 
#this fill with default information, the first time.
if IS_FIRST_TIME:
    
    if _is_no_user_in_db(): #if there are not user in db, so i think is the first time and create default values   
        
        #we need an admin
        _fill_required_admin()

        #This will create the initial content for the flatpages page used to orient the user/developer
        _insert_flatpages_default_content()
